<!-- HTML header for doxygen 1.8.18-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=9" />
    <meta name="generator" content="Doxygen 1.8.18" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>Limit Order Book: LOB::LimitTree&lt; side &gt; Struct Template Reference</title>
    <link href="tabs.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="jquery.js"></script>
    <script type="text/javascript" src="dynsections.js"></script>
    <link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
    <script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
    <link href="html_stylesheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <div id="top">
        <!-- do not remove this div, it is closed by doxygen! -->
        <div id="titlearea">
            <table cellspacing="0" cellpadding="0">
                <tbody>
                    <tr style="height: 56px;">
                        <td id="projectalign" style="padding-left: 0.5em;">
                            <div id="projectname">Limit Order Book
                                &#160;<span id="projectnumber">2.0.0</span>
                            </div>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <!-- end header part -->
<!-- Generated by Doxygen 1.8.18 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespace_l_o_b.html">LOB</a></li><li class="navelem"><a class="el" href="struct_l_o_b_1_1_limit_tree.html">LimitTree</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="struct_l_o_b_1_1_limit_tree-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">LOB::LimitTree&lt; side &gt; Struct Template Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>A single side (buy/sell) of the <a class="el" href="class_l_o_b_1_1_limit_order_book.html" title="An order book for managing Limit / Order objects in a continuous double auction.">LimitOrderBook</a>.  
 <a href="struct_l_o_b_1_1_limit_tree.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="limit__tree_8hpp_source.html">limit_tree.hpp</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:af889225100ab93c596081ceec4ffb474"><td class="memItemLeft" align="right" valign="top"><a id="af889225100ab93c596081ceec4ffb474"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_l_o_b_1_1_limit_tree.html#af889225100ab93c596081ceec4ffb474">clear</a> ()</td></tr>
<tr class="memdesc:af889225100ab93c596081ceec4ffb474"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clear all the limits in the tree. <br /></td></tr>
<tr class="separator:af889225100ab93c596081ceec4ffb474"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac4a8791f4b50ed29152d42940c3be06d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_l_o_b_1_1_limit_tree.html#ac4a8791f4b50ed29152d42940c3be06d">limit</a> (<a class="el" href="struct_l_o_b_1_1_order.html">Order</a> *order)</td></tr>
<tr class="memdesc:ac4a8791f4b50ed29152d42940c3be06d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Place a limit order on the limit tree.  <a href="struct_l_o_b_1_1_limit_tree.html#ac4a8791f4b50ed29152d42940c3be06d">More...</a><br /></td></tr>
<tr class="separator:ac4a8791f4b50ed29152d42940c3be06d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1098e1bb85b42a2e7ea550a8a3a7d56b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_l_o_b_1_1_limit_tree.html#a1098e1bb85b42a2e7ea550a8a3a7d56b">cancel</a> (<a class="el" href="struct_l_o_b_1_1_order.html">Order</a> *order)</td></tr>
<tr class="memdesc:a1098e1bb85b42a2e7ea550a8a3a7d56b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove an order from the limit tree.  <a href="struct_l_o_b_1_1_limit_tree.html#a1098e1bb85b42a2e7ea550a8a3a7d56b">More...</a><br /></td></tr>
<tr class="separator:a1098e1bb85b42a2e7ea550a8a3a7d56b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8dd611700d87618f14fdada0113272a5"><td class="memTemplParams" colspan="2">template&lt;typename Callback &gt; </td></tr>
<tr class="memitem:a8dd611700d87618f14fdada0113272a5"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="struct_l_o_b_1_1_limit_tree.html#a8dd611700d87618f14fdada0113272a5">market</a> (<a class="el" href="struct_l_o_b_1_1_order.html">Order</a> *order, Callback did_fill)</td></tr>
<tr class="memdesc:a8dd611700d87618f14fdada0113272a5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Perform a market order of given quantity on the given limit tree.  <a href="struct_l_o_b_1_1_limit_tree.html#a8dd611700d87618f14fdada0113272a5">More...</a><br /></td></tr>
<tr class="separator:a8dd611700d87618f14fdada0113272a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8d6aec814919b377fffeecd6c3919b83"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespace_l_o_b.html#a0860e916768a8e3baaadf73c1a6f9c58">Volume</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_l_o_b_1_1_limit_tree.html#a8d6aec814919b377fffeecd6c3919b83">volume_at</a> (<a class="el" href="namespace_l_o_b.html#a0170482547b909e8a53b5ae42d18e23a">Price</a> price) const</td></tr>
<tr class="memdesc:a8d6aec814919b377fffeecd6c3919b83"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the volume of orders at the given limit price.  <a href="struct_l_o_b_1_1_limit_tree.html#a8d6aec814919b377fffeecd6c3919b83">More...</a><br /></td></tr>
<tr class="separator:a8d6aec814919b377fffeecd6c3919b83"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae52da1196e73a756b93634df3940dcaa"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespace_l_o_b.html#a98c8cdadc7da7cd760e1a6dede850854">Count</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_l_o_b_1_1_limit_tree.html#ae52da1196e73a756b93634df3940dcaa">count_at</a> (<a class="el" href="namespace_l_o_b.html#a0170482547b909e8a53b5ae42d18e23a">Price</a> price) const</td></tr>
<tr class="memdesc:ae52da1196e73a756b93634df3940dcaa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the number of orders at the given limit price.  <a href="struct_l_o_b_1_1_limit_tree.html#ae52da1196e73a756b93634df3940dcaa">More...</a><br /></td></tr>
<tr class="separator:ae52da1196e73a756b93634df3940dcaa"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a87882ea3591e325656ed24a9ebb638e2"><td class="memItemLeft" align="right" valign="top"><a id="a87882ea3591e325656ed24a9ebb638e2"></a>
<a class="el" href="struct_l_o_b_1_1_limit.html">Limit</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_l_o_b_1_1_limit_tree.html#a87882ea3591e325656ed24a9ebb638e2">root</a> = nullptr</td></tr>
<tr class="memdesc:a87882ea3591e325656ed24a9ebb638e2"><td class="mdescLeft">&#160;</td><td class="mdescRight">the sorted tree of orders in the book <br /></td></tr>
<tr class="separator:a87882ea3591e325656ed24a9ebb638e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1dbe709a7aba8fab467db625c0d2d3e7"><td class="memItemLeft" align="right" valign="top"><a id="a1dbe709a7aba8fab467db625c0d2d3e7"></a>
<a class="el" href="namespace_l_o_b.html#a9f7f6214768b2e1c81ab886241d2075a">PriceLimitMap</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_l_o_b_1_1_limit_tree.html#a1dbe709a7aba8fab467db625c0d2d3e7">limits</a></td></tr>
<tr class="memdesc:a1dbe709a7aba8fab467db625c0d2d3e7"><td class="mdescLeft">&#160;</td><td class="mdescRight">a mapping of limit prices to limits <br /></td></tr>
<tr class="separator:a1dbe709a7aba8fab467db625c0d2d3e7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2295552bf2ed740a479ce87eb25594e0"><td class="memItemLeft" align="right" valign="top"><a id="a2295552bf2ed740a479ce87eb25594e0"></a>
<a class="el" href="struct_l_o_b_1_1_limit.html">Limit</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_l_o_b_1_1_limit_tree.html#a2295552bf2ed740a479ce87eb25594e0">best</a> = nullptr</td></tr>
<tr class="memdesc:a2295552bf2ed740a479ce87eb25594e0"><td class="mdescLeft">&#160;</td><td class="mdescRight">the best order <br /></td></tr>
<tr class="separator:a2295552bf2ed740a479ce87eb25594e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a941d1cf3065746647e08bb972f65121b"><td class="memItemLeft" align="right" valign="top"><a id="a941d1cf3065746647e08bb972f65121b"></a>
<a class="el" href="namespace_l_o_b.html#a0170482547b909e8a53b5ae42d18e23a">Price</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_l_o_b_1_1_limit_tree.html#a941d1cf3065746647e08bb972f65121b">last_best_price</a> = 0</td></tr>
<tr class="memdesc:a941d1cf3065746647e08bb972f65121b"><td class="mdescLeft">&#160;</td><td class="mdescRight">the last best price <br /></td></tr>
<tr class="separator:a941d1cf3065746647e08bb972f65121b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac6f9f6989f2d73a1917c1488252cfaf5"><td class="memItemLeft" align="right" valign="top"><a id="ac6f9f6989f2d73a1917c1488252cfaf5"></a>
<a class="el" href="namespace_l_o_b.html#a98c8cdadc7da7cd760e1a6dede850854">Count</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_l_o_b_1_1_limit_tree.html#ac6f9f6989f2d73a1917c1488252cfaf5">count</a> = 0</td></tr>
<tr class="memdesc:ac6f9f6989f2d73a1917c1488252cfaf5"><td class="mdescLeft">&#160;</td><td class="mdescRight">the total number of active orders for this tree <br /></td></tr>
<tr class="separator:ac6f9f6989f2d73a1917c1488252cfaf5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a64a5025b0f65c36c1a6f2d4056543ea7"><td class="memItemLeft" align="right" valign="top"><a id="a64a5025b0f65c36c1a6f2d4056543ea7"></a>
<a class="el" href="namespace_l_o_b.html#a0860e916768a8e3baaadf73c1a6f9c58">Volume</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_l_o_b_1_1_limit_tree.html#a64a5025b0f65c36c1a6f2d4056543ea7">volume</a> = 0</td></tr>
<tr class="memdesc:a64a5025b0f65c36c1a6f2d4056543ea7"><td class="mdescLeft">&#160;</td><td class="mdescRight">the total volume of orders for this tree <br /></td></tr>
<tr class="separator:a64a5025b0f65c36c1a6f2d4056543ea7"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;Side side&gt;<br />
struct LOB::LimitTree&lt; side &gt;</h3>

<p>A single side (buy/sell) of the <a class="el" href="class_l_o_b_1_1_limit_order_book.html" title="An order book for managing Limit / Order objects in a continuous double auction.">LimitOrderBook</a>. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a1098e1bb85b42a2e7ea550a8a3a7d56b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1098e1bb85b42a2e7ea550a8a3a7d56b">&#9670;&nbsp;</a></span>cancel()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;Side side&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="struct_l_o_b_1_1_limit_tree.html">LOB::LimitTree</a>&lt; side &gt;::cancel </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_l_o_b_1_1_order.html">Order</a> *&#160;</td>
          <td class="paramname"><em>order</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Remove an order from the limit tree. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">order</td><td>an order that exists in the limit tree </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ae52da1196e73a756b93634df3940dcaa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae52da1196e73a756b93634df3940dcaa">&#9670;&nbsp;</a></span>count_at()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;Side side&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespace_l_o_b.html#a98c8cdadc7da7cd760e1a6dede850854">Count</a> <a class="el" href="struct_l_o_b_1_1_limit_tree.html">LOB::LimitTree</a>&lt; side &gt;::count_at </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespace_l_o_b.html#a0170482547b909e8a53b5ae42d18e23a">Price</a>&#160;</td>
          <td class="paramname"><em>price</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return the number of orders at the given limit price. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">price</td><td>the limit price to return the number of orders for </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the number of orders at the given limit price </dd></dl>

</div>
</div>
<a id="ac4a8791f4b50ed29152d42940c3be06d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac4a8791f4b50ed29152d42940c3be06d">&#9670;&nbsp;</a></span>limit()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;Side side&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="struct_l_o_b_1_1_limit_tree.html">LOB::LimitTree</a>&lt; side &gt;::limit </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_l_o_b_1_1_order.html">Order</a> *&#160;</td>
          <td class="paramname"><em>order</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Place a limit order on the limit tree. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">order</td><td>an order that matches the side of this tree </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a8dd611700d87618f14fdada0113272a5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8dd611700d87618f14fdada0113272a5">&#9670;&nbsp;</a></span>market()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;Side side&gt; </div>
<div class="memtemplate">
template&lt;typename Callback &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="struct_l_o_b_1_1_limit_tree.html">LOB::LimitTree</a>&lt; side &gt;::market </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_l_o_b_1_1_order.html">Order</a> *&#160;</td>
          <td class="paramname"><em>order</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Callback&#160;</td>
          <td class="paramname"><em>did_fill</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Perform a market order of given quantity on the given limit tree. </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">Callback</td><td>a callable function that excepts an order ID </td></tr>
  </table>
  </dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">order</td><td>the order to find a market order for </td></tr>
    <tr><td class="paramname">did_fill</td><td>the callback handler for when an order is filled </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a8d6aec814919b377fffeecd6c3919b83"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8d6aec814919b377fffeecd6c3919b83">&#9670;&nbsp;</a></span>volume_at()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;Side side&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespace_l_o_b.html#a0860e916768a8e3baaadf73c1a6f9c58">Volume</a> <a class="el" href="struct_l_o_b_1_1_limit_tree.html">LOB::LimitTree</a>&lt; side &gt;::volume_at </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespace_l_o_b.html#a0170482547b909e8a53b5ae42d18e23a">Price</a>&#160;</td>
          <td class="paramname"><em>price</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return the volume of orders at the given limit price. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">price</td><td>the limit price to return the volume for </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the volume of orders at the given limit price </dd></dl>

</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li>include/<a class="el" href="limit__tree_8hpp_source.html">limit_tree.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.18-->
<!-- start footer part -->
</body>
</html>
